<?php
/**
 * 评论控制器后台
 * Created by PhpStorm.
 * User: zxj
 * Date: 17/5/2
 * Time: 下午12:01
 */


namespace App\Http\Controllers\Admin;

use App\Models\Comment;

class CommentController extends BaseController
{

    public function __construct(Comment $comment)
    {
        parent::__construct();
        $this->comment = $comment;
    }

    /**
     * 读取评论列表
     * @return \Illuminate\Http\JsonResponse
     */
    public function getCommentList(){
        $res = $this->comment->commentList(request());
        return view('admin.comment.list',compact('res'));
    }
/*
    //根据id评论信息
    public function getCommentInfo(){

        $res = $this->comment->getCommentById(request());
        return ajax_return($res);

    }*/

    // 编辑评论审核状态
    public function postEditComment()
    {
        $res = $this->comment->editComment(request());
        return ajax_return($res);

    }

}